import request from '@/utils/request.js'
// export function regAPI(obj) {
//   return request.post('/api/reg', obj)
// }

export const regAPI = obj => request.post('/api/reg', obj)
export const loginAPI = obj => request.post('/api/login', obj)
// export function loginAPI(obj) {
//   return request.post('/api/login', obj)
// }

export const getUserAPI = () => request.get('/my/userinfo')

export const getMuenAPI = () => request.get('/my/menus')

export const updateUserAPI = (obj) => request.put('/my/userinfo', obj)

export const updateavarAPI = (str) => request.patch('/my/update/avatar', { avatar: str })

export const updatePwdAPI = (obj) => request.patch('/my/updatepwd', obj)
